Forecasting demand using hierarchical temporal memory

ABSTRACT

In general, embodiments of the present invention provide systems, methods and computer readable media to forecast demand by implementing an online demand prediction framework that includes a hierarchical temporal memory network (HTM) configured to learn temporal patterns representing sequences of states of time-series data collected from a set of one or more data sources representing demand and input to the HTM. In some embodiments, the HTM learns the temporal patterns using a Cortical Learning Algorithm.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.14/671,878, titled “FORECASTING DEMAND USING HIERARCHICAL TEMPORALMEMORY, filed Mar. 27, 2015, which claims the benefit of U.S.Provisional Application No. 61/972,049, titled “FORECASTING DEMAND USINGHIERARCHICAL TEMPORAL MEMORY,” filed Mar. 28, 2014, the contents ofwhich are incorporated herein by reference in their entirety.

FIELD

Embodiments of the invention relate, generally, to online demandprediction using hierarchical temporal memory.

BACKGROUND

Current methods for forecasting demand exhibit a plurality of problemsthat make current systems insufficient, ineffective and/or the like.Through applied effort, ingenuity, and innovation, solutions to improvesuch methods have been realized and are described in connection withembodiments of the present invention.

SUMMARY

In general, embodiments of the present invention provide herein systems,methods and computer readable media for online demand prediction usinghierarchical temporal memory (HTM).

The details of one or more embodiments of the subject matter describedin this specification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING(S)

Having thus described the invention in general terms, reference will nowbe made to the accompanying drawings, which are not necessarily drawn toscale, and wherein:

FIG. 1 illustrates an example system that can be configured to implementan exemplary process for sales pipeline automation in accordance withsome embodiments discussed herein;

FIG. 2 shows a schematic block diagram of circuitry that can be includedin a computing device in accordance with a demand module in accordancewith some embodiments discussed herein;

FIG. 3 is an illustration of an exemplary prior art 4-layer HTM and aview of an exemplary prior art HTM layer in accordance with someembodiments discussed herein;

FIG. 4 is an illustration of an exemplary online demand predictionframework (ODPF) that is configured to generate demand forecasting inaccordance with some embodiments discussed herein;

FIG. 5 illustrates a prior art example of generating an HTM model inputrequest in accordance with some embodiments discussed herein;

FIG. 6 illustrates a prior art example of an HTM model result and itsassociated metrics in accordance with some embodiments discussed herein;

FIG. 7 illustrates a prior art example of an HTM model outputdetermination in accordance with some embodiments discussed herein; and

FIG. 8 illustrates a schematic block diagram of circuitry that can beincluded in a computing device, such as an online demand predictionsystem, in accordance with some embodiments discussed herein.

DETAILED DESCRIPTION

The present invention now will be described more fully hereinafter withreference to the accompanying drawings, in which some, but not allembodiments of the invention are shown. Indeed, this invention may beembodied in many different forms and should not be construed as beinglimited to the embodiments set forth herein; rather, these embodimentsare provided so that this disclosure will satisfy applicable legalrequirements. Like numbers refer to like elements throughout.

As described herein, system components can be communicatively coupled toone or more of each other. Though the components are described as beingseparate or distinct, two or more of the components may be combined intoa single process or routine. The component functional descriptionsprovided herein including separation of responsibility for distinctfunctions is by way of example. Other groupings or other divisions offunctional responsibilities can be made as necessary or in accordancewith design preferences.

As used herein, the terms “data,” “content,” “information” and similarterms may be used interchangeably to refer to data capable of beingcaptured, transmitted, received, displayed and/or stored in accordancewith various example embodiments. Thus, use of any such terms should notbe taken to limit the spirit and scope of the disclosure. Further, wherea computing device is described herein to receive data from anothercomputing device, the data may be received directly from the anothercomputing device or may be received indirectly via one or moreintermediary computing devices, such as, for example, one or moreservers, relays, routers, network access points, base stations, and/orthe like. Similarly, where a computing device is described herein tosend data to another computing device, the data may be sent directly tothe another computing device or may be sent indirectly via one or moreintermediary computing devices, such as, for example, one or moreservers, relays, routers, network access points, base stations, and/orthe like.

As used herein, the term “promotion and marketing service” may refer,without limitation, to a service that is accessible via one or morecomputing devices and is operable to provide example promotion and/ormarketing services on behalf of one or more providers that are offeringone or more instruments that are redeemable for goods, services,experiences and/or the like. The promotion and marketing service isfurther configured to illustrate or otherwise inform one or moreconsumers of the availability of one or more instruments in the form ofone or more impressions. In some examples, the promotion and marketingservice may also take the form of a redemption authority, a paymentprocessor, a rewards provider, an entity in a financial network, apromoter, an agent and/or the like. As such, the service is, in someexample embodiments, configured to present one or more promotions viaone or more impressions, accept payments for promotions from consumers,issue instruments upon acceptance of an offer, participate inredemption, generate rewards, provide a point of sale device or service,issue payments to providers and/or or otherwise participate in theexchange of goods, services or experiences for currency, value and/orthe like.

As used herein, the term “provider” may be used to refer, withoutlimitation, to a merchant, business owner, consigner, shopkeeper,tradesperson, vender, operator, entrepreneur, agent, dealer,organization or the like that is in the business of a providing a good,service or experience to a consumer, facilitating the provision of agood, service or experience to a consumer and/or otherwise operating inthe stream of commerce. For example, a provider may be in the form of arunning company that sells attire that is generally used by a person whoruns or participates in athletic activities.

As used herein, the terms “promotion,” “offer,” “deal” and similar termsmay be used interchangeably to refer, without limitation, to any type ofoffered, presented or otherwise indicated reward, discount, coupon,credit, incentive, discount, media or the like that is indicative of apromotional value or the like that upon purchase or acceptance resultsin the issuance of an instrument that may be used toward at least aportion of the purchase of particular goods, services and/or experiencesdefined by the promotion. An example promotion, using the aforementionedrunning company as the example provider, is $25 for $50 toward runningshoes. In some examples, the promotion defines an accepted value (e.g.,a cost to purchase the promotion), a promotional value (e.g., the valueof the resultant instrument beyond the accepted value), a residual value(e.g., the value upon return or upon expiry of one or more redemptionparameters), one or more redemptions parameters and/or the like. Forexample, and using the running company promotion as an example, theaccepted value is $25 and the promotional value is $50. In this example,the residual value may be equal to the accepted value.

As used herein, the term “instrument” may be used, without limitation,to refer to any type of gift card, tender, electronic certificate,medium of exchange, voucher, or the like that embodies the terms of thepromotion from which the instrument resulted and may be used toward atleast a portion of the purchase, acquisition, procurement, consumptionor the like of goods, services and/or experiences. In some examples, theinstrument may take the form of tender that has a given value that isexchangeable for goods, services and/or experiences and/or a reductionin a purchase price of a particular good, service or experience. In someexamples, the instrument may have multiple values, such as acceptedvalue, a promotional value and/or a residual value. For example, usingthe aforementioned running company as the example provider, anelectronic indication in a mobile application that shows $50 of value tospend at the running company. In some examples, the accepted value ofthe instrument is defined by the value exchanged for the instrument. Insome examples, the promotional value is defined by the promotion fromwhich the instrument resulted and is the value of the instrument beyondthe accepted value. In some examples, the residual value is the valueafter redemption, the value after the expiry or other violation of aredemption parameter, the return or exchange value of the instrumentand/or the like.

As used herein, the term “impression” may be used, without limitation,to refer to a communication, a display, or other perceived indication,such as a flyer, print media, e-mail, text message, application alert,mobile applications, other type of electronic interface or distributionchannel and/or the like, of one or more promotions. For example, andusing the aforementioned running company as the example provider, ane-mail communication sent to consumers that indicates the availabilityof a $25 for $50 toward running shoes promotion.

As used herein, the terms “consumer” and “customer” may be usedinterchangeably to refer, without limitation, to a client, customer,purchaser, shopper, user or the like who may be in the position to ordoes exchange value for one or more instruments under the terms definedby the one or promotions. For example, and using the aforementionedrunning company as the example provider, an individual who is interestedin purchasing running shoes.

The methods, systems, and computer program products described herein areoperable to automate a sales pipeline by implementing and/or otherwiseexecuting a demand module, a supply identification module, an assignmentmodule and/or the like. In some examples, the demand module may beconfigured to determine a forecasted demand for offers (e.g., any typeof presented or otherwise indicated reward, discount, coupon, credit,deal, incentive, discount, media or the like that is indicative of anoffered value or the like that upon purchase or acceptance results inthe issuance of an instrument that may be used toward at least a portionof the purchase of particular goods, services and/or experiences definedby the offer). The forecasted demand provides or otherwise enables aprediction of those offers that a consumer (e.g., a client, customer,purchaser, shopper, user or the like who may be in the position to ordoes exchange value for one or more offers) will likely purchase ifoffered, and, as such, enables the prioritization of the sales of theforecasted or demanded offers, which may result in greater interest,revenue, higher margin, offer diversity and/or the like.

As such, and according to some example embodiments, the systems andmethods described herein are configured to forecast demand byimplementing an online demand prediction framework (ODPF) that includesa hierarchical temporal memory network (HTM) configured to learntemporal patterns representing sequences of states of time-series datacollected from a set of one or more data sources representing demand andinput to the HTM. In embodiments, exemplary data sources may includebookings, retail sales, user clickstream data, and/or exogenous data(e.g., live Twitter interest in data categories and/or services). Insome embodiments, the HTM learns the temporal patterns using a CorticalLearning Algorithm (CLA).

An HTM is capable of online learning, i.e., learning by continuallymodifying its stored sequences of patterns based on each new input itreceives. Generating an HTM model via online learning can be implementedby exposure of the HTM to sequences of inputs that include historicaldatastreams, live datastreams, or a combination; online learning doesnot require a distinct training phase such as supervised learning does,and thus enables the avoidance of the often significant costs associatedwith machine learning, e.g., assembling a supervised learning trainingdata set that is representative of a solution to a particular problem tobe solved. An HTM model becomes more efficient at learning as it isexposed to more input data. It is able to adapt in place if the inputdata change and thus is more resistant to noisy input data than a neuralnetwork trained using supervised learning.

In embodiments, the HTM represents a demand model which is the basis forgenerating predictions of future states of the input data from the setof data sources. The ODPF output is at least one record that includespredictions generated by the HTM demand model. In some embodiments, theODPF output includes at least one metric respectively associated witheach the generated predictions. In some embodiments, the metric may bean error score representing the quality of the prediction, an anomalyscore representing a comparison between the prediction and its mostlikely expected value, and/or a combination.

In embodiments, the HTM demand model generates simultaneous predictionsof demand at multiple different points of future time. An exemplarymodel output that includes these multi-step predictions may be thepredicted number of bookings at one day, one week, and one month in thefuture. In some embodiments in which the HTM demand model outputincludes sets of predictions about multiple types of data collected fromdifferent data sources, each set of predictions may be shifted forwardin time at different time intervals.

In some embodiments, demand forecasting may be based in part on thedemand predictions in an ODPF output. For example, in embodiments,forecasting demand may be based on predicting sales month by month forthe next year provided there are sufficient units available;extrapolating, using the predicted sales, a total of units that will besold in the next year; and predicting total sales revenue for the nextyear based on the total of units that will be sold.

FIG. 1 illustrates an example system 100 that can be configured toimplement an exemplary process 100 for sales pipeline automation. Theprocess is described in detail in U.S. patent application Ser. No.13/826,333, filed Mar. 12, 2013, titled “METHOD, APPARATUS, AND COMPUTERPROGRAM PRODUCT FOR FORECASTING DEMAND,” and which is incorporatedherein in its entirety.

In general, the process 100 may forecast or otherwise determine a demandvia the demand module 102. The demand illustrates and/or otherwiseidentifies the offers a consumer is willing to purchase in a local area(e.g., category and/or sub category of a good, service or experience, aprice, a location, a time and/or the like). In some examples, theforecasted demand may be indicative of demanded offers in the localarea, however in other examples the demand may be indicative of ademanded good, service or experience in the local area irrespective ofan offer.

In order to facilitate the forecasted demand, the demand module 102 isconfigured to generate one or more virtual offers, such as via thetaxonomy model 108 and/or the virtual offer builder 110. Virtual offersare representative of one or more offers that could be offered in alocal area. For example, $25 massages or $10 for $20 at a local clothingstore. Additional description relating to the building the one or moreoffers is further described at least with respect to the virtual offergeneration module 202 in FIG. 2 .

The virtual offers may then be analyzed to determine the probabilitiesthat a particular consumer, such as a current or past subscriber, wouldpurchase the particular virtual offer, such as via the demandcalculation engine 114. The demand calculation engine 114 may beconfigured to generate or otherwise determine the probabilities based onfor example past purchase history in a consumer database 112, historicdemand for similar offers, search engine results, survey results,current market trends and/or the like. Using the probabilities (e.g.,the probability that each of a plurality of consumers would buy each ofa plurality of virtual offers), a forecasted demand may be generated.Additional description relating to determining the probability that aparticular customer would purchase a particular offer is furtherdescribed at least with respect to the probability generation module 204in FIG. 2 .

In some example embodiments, the demand module 102 may adjust theforecasted demand based on factors, such as, but not limited toseasonality, economic conditions, holidays, weather and/or the like.Additional description relating to demand adjustment is furtherdescribed at least with respect to the demand adjustment module 206 inFIG. 2 . The demand module 102 is configured to output a forecasteddemand to the supply ID module 104.

FIG. 2 shows a schematic block diagram of circuitry that can be includedin a computing device in accordance with demand module 102 shown, forexample, in process 100. Demand module 102 may include virtual offergeneration module 202, a probability generation module 204, a demandadjustment module 206 and/or the like to generate a forecasted demand orone or more virtual offers. Each block of the circuit diagrams, andcombinations of blocks in the circuit diagrams, may be implemented byspecial purpose hardware-based computer systems that perform thespecified functions or steps, or combinations of special purposehardware and computer instructions.

The virtual offer generation module 202 may utilize input from orotherwise embody a taxonomy model 108 and/or a virtual offer builder 110to generate a virtual offer. In some example embodiments, the taxonomymodel 108 defines a hierarchical structure of service categories andsub-categories that may be found in one or more local or hyper-localareas. For example, the taxonomy model 108 may define “food and dining”as a category and “Italian” as a sub-category. Alternatively oradditionally, the taxonomy model 108 may define a hierarchical structurethat is based on location, sub-locations, and/or hyper-local regions,such as any of country, state, county, city, zip code, neighborhood, orstreet. For example, a location may be “Chicago” and a hyper-localregion may be “north side”. Alternatively or additionally, the taxonomymodel 108 may define a hierarchical structure that is based on targetconsumer categories such as “family fun” or “high octane adventures.”One or more of the sub-categories may then be specific to the targetconsumer category, for example, “children under 5” or “high speed”respectively. Additional sub-categories may be general, such as “dining”or “in your neighborhood”. In another embodiment, the taxonomy model 108may define a hierarchical structure that is based on service. Forexample, “wine/food” or “Swedish massage”. Virtual offer builder 110 maygenerate a virtual offer based on such hierarchical structure, such thata virtual offer may comprise a service, a category and sub-category. Forexample, “wine/food”, “food and dining” and “Italian” may be service,category and sub-category of a virtual offer.

In some example embodiments, the virtual offer builder 110 may beconfigured to construct one or more virtual offers. In some examples,every combination of virtual offers that may be constructed, as definedby a taxonomy model, is constructed. Alternatively or additionally, thevirtual offer generation module 202 may be configured to generatevirtual offers according to a set of guidelines or rules. The guidelinemay be operable to provide limitations on prices or price ranges thatone or more sub-sets of categories and/or sub-categories may be pairedwithin a virtual offer. For example, the virtual offer generation module202 may be configured to limit the generation of a first category and/orfirst sub-category to a first sub-set of price ranges. For example, avirtual offer comprising a category of “food and dining” and asub-category of “pizza” may be limited to prices and/or price rangesunder a predetermined limit, e.g., $100. Whereas a virtual offercomprising a category of “food and dining” and a sub-category of “finedining” may be limited to prices and/or price ranges over apredetermined limit, e.g., $50.

In another example embodiment, the limitations on the generation ofvirtual offers may be made according to prior performance of the virtualoffers at each of one or more prices or price ranges, prior performanceof certain categories and/or the like. Alternatively or additionally,the virtual offer generation module 202 may limit virtual offergeneration to a specific time period (e.g., “spring”, “February”, “next60 days”), a specific location and/or hyper-local region (e.g.,“Chicago” and/or “60602”). In further examples, the virtual offers maybe limited to categories and/or sub categories having merchants in agiven area.

In some example embodiments, the virtual offer generation module 202 mayprovide one or more generated virtual offers to the probabilitygeneration module 204. The probability generation module 204 may beconfigured to determine a probability that a particular consumer maypurchase a particular virtual offer. The probability generation module204 may be configured to access consumer data in a consumer database112. The consumer database 112 may comprise one or more users and userdata related to each of the one or more users that may be used tocalculate a probability that a particular user would buy a particularoffer in a particular time frame for at least a portion of the pluralityof users and for each of the virtual offers. In one example embodiment,the probability generation module 204 may determine a probability that afirst consumer, second customer, an n^(th) customer would buy a firstvirtual offer.

In some example embodiments, the probability generation module 204 mayfurther be configured to generate a ranked user list for each of the oneor more users comprising each of the one or more virtual offers and anassociated calculated probability. In some examples, the probabilitygeneration module 204 may be operable to cast a vote for a particularoffer. For example, a vote may be cast for the top t offers in theranked list. Alternatively or additionally, the vote value may beassigned based on the area in the ranked list and/or the like.

In some examples, a union of the top t offers for each user, the top xoffers based on votes or the like may be used to select demanded offersfrom the set of virtual offers. Given a specific list of demandedoffers, each of the demanded offers may be matched with a forecasteddemand (e.g., in terms of quantity of units, revenue or the like) byaggregating the probabilities that each of the users would purchase theoffer as output by the demand calculation engine 114. Alternatively oradditionally, the output may be ranked, prioritized, diversified, and/ortrimmed. In some example embodiments, a projected revenue value may becalculated for each virtual offer based on prior performance data perunit and an estimated number of units to be sold. Based on the revenuecalculation, the one or more virtual offers by the projected revenue.

The demand adjustment module 206 may be configured to input the list ofdemanded offers and provide one or more adjustments based on diversity,portfolio mix, price mix, hyper-local constraints, prior performance,context information or the like using a prior performance database 210,historical contextual information 212, and inventory 214. In someexample embodiments, the demand adjustment module 206 may apply adiversity adjustment. The diversity adjustment may comprise user-leveldiversity adjustment (e.g., individual consumer probabilities areadjusted based on predetermined constraints, such as user may have a 40%“food and dining” maximum), aggregated output level (e.g., forecasteddemand is adjusted to predetermined constraints, such as a maximum of40% food and dining, 30% health and beauty and/or the like) and/or thelike. Alternatively or additionally, the adjustment may take intoaccount a category mix, such as by selecting a certain percentage ofoffers based on the ranked list according to a set percentage, a pricemix or the like.

In some example embodiments, the demand adjustment module 206 may beconfigured to adjust the forecasted demand according to priorperformance. For example, specific offers may have outperformed orunderperformed calculated demand of a related virtual offer in a pastoffering, indicating that the demand for the related virtual offer maybe more accurately represented by a higher or lower demand. In suchcases, the demand adjustment module 206 may adjust the forecasted demandbased on the historic data.

In some example embodiments, the demand adjustment module 206 may beconfigured to adjust a demand of one or more virtual offers according tocontext information, such as seasonality, discrete weather events,economic conditions and/or other recurring events. For example, demandfor one or more categories or sub-categories may be adjusted accordingto seasonality or a specific season (e.g., adjust “ski” virtual offersupward in late fall or winter and adjust down in spring), rainfall(e.g., adjust “outdoor virtual offers during above average rainfallperiods) and/or the like. In some example embodiments, specific eventsmay cause adjustment (e.g., adjust “golf” virtual offers during timeperiods when golf events are happening, such as the U.S. Open and/or inlocations or hyper-local regions where golf events are taking place,such as Rochester, N.Y. during the PGA championship 2013.).

The demand adjustment module 206 may therefore be configured to outputone or more virtual offers, each with a corresponding demand. Thecorresponding demand may include demand amounts that may have beenadjusted based on any one or more of the aforementioned factors. Thecorresponding demand may also include demand amounts that have notadjusted by any of the aforementioned factors. As such, the collectivedemand information output by probability generation module 204 isreferred to as forecasted demand herein.

Alternatively or additionally, demand may be forecasted using historicalconversion rates for each potential virtual offer and each knownconsumer, top categories or sub categories rank ordered by performancemetrics such as Engaged User Profit Per Thousand (ePPM) or the like,search engine data, use of a website that provides the one or moreoffers, subscription data, historical sales, sales in the market placeand/or the like. In some examples, offer related keywords on searchengines click through to an offer can be leveraged as a signal of demand(e.g., a model that translates or otherwise correlates searches tooffers sold). In some examples, the use of a website or mobileapplication that displays or otherwise advertises available offers maybe tracked as an exogenous source of demand and can be used inidentifying not only the current demand, but also for identifying highdemand offers that are not currently stocked. Each of these demandforecasting methods may be used in conjunction with each of the otherdemand forecasting methods as well as may be used alone.

In some alternative embodiments, the probability generation module 204may be implemented as an online demand prediction framework (ODPF,hereinafter) that includes a hierarchical temporal memory network (HTM,hereinafter) which is configured to learn temporal patterns representingsequences of states of at least one datastream representing a timeseries of data collected from a set of one or more data sourcesrepresenting demand. In some embodiments, for example, the set of datasources may include one or more of bookings, retail sales, and/or userclickstream data representing deal page clicks. In some embodiments, theHTM network is configured to learn temporal patterns using a corticallearning algorithm (CLA) as described, for example, in “HierarchicalTemporal Memory including HTM Cortical Learning Algorithms, version0.2.1, Sep. 12, 2011” a white paper published online by Numenta, Inc. athttp://numenta.org/cla-white-paper.html.

FIG. 3 is an illustration of an exemplary prior art 4-layer HTM 300A anda view of an exemplary prior art HTM layer 300B. Exemplary HTM 300A andexemplary HTM layer 300B are for illustration only and are notrepresentative embodiments of the invention.

An HTM is considered to be a type of neural network, because itsstructure models the structure of the brain neocortex. Each layer of anHTM is considered to represent one layer of neurons in a neocorticalregion, and is a structure composed of interconnected columns of nodes(cells hereinafter). Exemplary layer 300B is a 5 by 14 two-dimensionalarray of 4-cell columns. The choice of the number of cells per column,the organization of the columns, and the number of columns within eachHTM layer is fully configurable and may be based in part on the HTMinformation storage requirements.

The input to a layer is a set of bits that each may be active (value 1)or inactive (value 0); the set of bits thus represents a binary encodingof the input. Each column in a layer is connected to a unique subset ofthe input bits, and the cells within each column may become active orinactive in response to a sum of the values of input bits respectivelyreceived by the column. The columns within a layer are interconnected,and the columns with the strongest activation (i.e., the columnscontaining the highest number of active cells) in response to input caninhibit, or deactivate, the cells in columns with weaker activation.Thus, a layer's response to input can create an encoding of activation(an activation pattern, hereinafter) across the cells in the layer. Anactivation pattern may be stored within a layer according to a sparse(only a few cells in the layer are active) distributed (the cellactivity is interpreted within the context of all the cells in thelayer) pattern, as illustrated by the pattern of shaded cells inexemplary layer 300B. The HTM layer thus can remember receiving aprevious instance of a new input if it can match the activation patternproduced by the new input with an activation pattern it has stored.

The layers of an HTM (e.g., the 4 layers in exemplary HTM 300A) arearranged in a hierarchy, with each layer having interconnections to itsparent layer in the hierarchy. The initial input data bits 305 arereceived by the bottom layer in the hierarchy, and the cell activationpatterns generated in the lower layer become the inputs to its parentlayer. Thus, the higher an HTM layer is in the hierarchy, the moreabstract and interpreted are the patterns it receives and stores. Thestoring and processing of visual input by the brain is a biologicalanalogy to the storing and processing of information in layers of anHTM. The neurons in the lower layers of the visual system (e.g., neuronsin the thalamus of the brain) receive (via the optic nerve) andinterpret the initial sensory input coming from the eye (e.g., patternsof activation of receptors from the retina), while the neurons in thehigher layers of the brain (e.g., neurons in the visual cortex thatinterpret images) receive patterns of activation from the neurons in thelower layers of the brain.

An HTM “learns” by being exposed to many time-changing sequences ofinputs from a common source, and then storing the sequences of patternsas a model of which patterns follow which other patterns. This model canbe used as the basis for inference, i.e., to recognize input patternsand then to make predictions, based on the stored sequence of inputs towhich the recognized input as well as immediately past inputs mostlikely belong, about which other patterns are most likely to follow therecognized input. Each layer stores its respective model of thesequencing of input patterns it receives. The output 315 of an HTM isthe set of predictions made by the layer at the top level of thehierarchy. Referring to the visual system analogy, the output of visualprocessing by the brain is an interpretation of images perceived by thevisual cortex.

A typical neural network (e.g., a multi-layer feed-forward network) isgenerated during a supervised learning training phase (e.g., backpropagation), a conventional machine learning methodology in which theweight coefficients associated with the network nodes and edges areadapted based on exposure to a training data set of exemplary inputs andtheir known associated outputs. An HTM, in contrast, is capable ofonline learning, i.e., learning by continually modifying its storedsequences of patterns based on each new input it receives. Generating anHTM model via online learning can be implemented by exposure of the HTMto sequences of inputs that include historical datastreams, livedatastreams, or a combination; online learning does not require adistinct training phase such as supervised learning and thus enables theavoidance of the often significant costs associated with machinelearning, e.g., assembling a supervised learning training data set thatis representative of a solution to a particular problem to be solved.

An HTM model becomes more efficient at learning as it is exposed to moreinput data. It is able to adapt in place if the input data change andthus is more resistant to noisy input data than a neural network trainedusing supervised learning. Since each HTM layer learns a respectivemodel of its input, it is possible to freeze online learning for some orall of the HTM layers to match characteristics of the input data (e.g.,freeze online learning for the lower layers in cases where the initialinput is constant while allowing the upper layers to continue to adaptto new sequences of input received from the lower layers).

FIG. 4 is an illustration of an exemplary online demand predictionframework (ODPF) 400 that is configured to generate demand forecastingaccording to various embodiments of the invention. In some embodiments,ODPF 400 may be configured to implement probability generation module204 within sales pipeline automation system 100 by leveraging an HTMdemand model to make predictions about input data representing demand.In embodiments, ODPF 400 may comprise an ODPF interface 410 forreceiving input data and generating and/or dispatching input requests tomodules within the ODPF 400; an HTM demand model 420 for receiving inputrequests comprising at least one time series datastream from at leastone data source (e.g., taxonomy model 108, consumer database 112, priorperformance database 210, and/or historical contextual information 212),recognizing patterns within the input data, and generating a demandmodel result comprising at least one inference based on the recognizedpatterns; a metrics module 430 for optionally generating representationsof the quality of the inferences generated by the HTM model 420; and anoutput module 440 for generating at least one report 445 of the modelpredictions and/or the metrics results.

In embodiments, ODPF interface 410 includes a data input client thatreceives time series data representing demand from one or more datasources. In some embodiments, demand may represent demand for promotions(deals, hereinafter) that are offered or are to be offered by apromotion and marketing service, and the data sources may includeattributes of deals, orders, retail sales, and/or user clickstream datathat represents deal page clicks made by users. In some embodiments, thedata sources include one or a combination of historical data (e.g.,warehoused data) and/or live data that are currently being collected bythe promotion and marketing service.

In some embodiments, the received time series data representing demandmay be pre-processed further before it is input to an HTM demand model420. For example, in some embodiments, further pre-processing of timeseries data may include slicing a time series of monthly sales datacollected over a previous period of time (e.g., the past 6 months)according to one or more of the following attributes: deal category,service, subdivision, and/or price bin. In some embodiments, furtherpre-processing may include creating tuples of interest from combinationsof the additionally sliced data. In some embodiments, tuples of interestmay be included as input to an HTM demand model 420 to discover one ormore particular combinations of data attributes that may be the mostsignificant predictors of demand. In some embodiments, pre-processing ofthe input data may be implemented in the ODPF interface 410 while, inalternative embodiments, data pre-processing may be implemented externalto the ODPF 400. In some embodiments, the input time series datareceived by the ODPF interface 410 may include a combination ofpre-processed data (e.g., monthly sales data pre-processed into tuplesof interest) and time-series data that has not been pre-processed (e.g.,monthly retail sales and/or monthly clickstream data).

In some embodiments, ODPF interface 410 generates an HTM model inputrequest based on received input data that may further include requestconfiguration data. In embodiments, request configuration data mayspecify generating the HTM model input request and/or specify the modelresults to be returned in a report of the model predictions based on thetime series data being input to the model. Examples of requestconfiguration data may include specification of enabling/disabling modelinferencing, specification of the number and type of predictions to begenerated by the model, enabling/disabling of additional learning (i.e.,whether learning should be frozen in some or all of the model layers, asdescribed with reference to FIG. 3 ), and/or enabling/disabling thecalculation of metrics for the model predictions.

FIG. 5 illustrates a prior art example 500 of generating an HTM modelinput request. In some embodiments, generating an HTM demand modelrequest may be implemented by ODPF interface 410. The data in example500 are included for illustration purposes only, and are notrepresentative of embodiments of the invention.

In embodiments, received raw input data may be represented as adictionary object containing key/value pairs. In some embodiments,generating an HTM demand model input request may further comprisetranslating some or all of the received raw input data into anintermediate representation (e.g., generating a scalar representation,quantizing data values by assigning them to one of a set of bins).Referring to exemplary translation 500, the raw input timestamp has beentranslated into the time of day and the day of the week, while the rawdata for consumption and play type have not been translated. In someembodiments, the extent of and type of data translation implementedduring generation of an HTM model input request may be specified in theinput data received by ODPF interface 410.

In some embodiments, generating an HTM demand model input request mayfurther comprise encoding the raw input data and/or translated inputdata into a binary representation for input to the HTM demand model 420.In some embodiments, the encoding of data implemented during generationof an HTM model input request may be specified in the input datareceived by ODPF interface 410.

In some embodiments, the ODPF 400 may be initialized by implementing aninitial learning phase during which an instantiated HTM demand model 420converges in response to receiving time series data representing demand.For example, in embodiments, an initial learning phase may includeadapting the instantiated HTM by implementing a Cortical LearningAlgorithm (CLA). For example, in embodiments, an ODPF 400 initiallearning phase may include instantiating an N-layer HTM and using a CLAto adapt the instantiated HTM in response to receiving an inputdatastream of warehoused data representing daily gross revenue from pastbookings and past clickstream data. In some embodiments, the inputdatastream may be input repeatedly to the HTM, since, as previouslydescribed with reference to FIG. 3 , learning efficiency of an HTMimproves with experience. In some embodiments, the HTM demand model 420is determined to converge when a pattern of daily fluctuations ispredicted with xx % accuracy. In some embodiments, calculating metricsrepresenting the accuracy of predictions is implemented by metricsmodule 430. In some alternative embodiments, the ODPF 400 does notimplement an initial learning phase and, instead, may be initialized byincluding an HTM demand model 420 that has converged already.

In some embodiments, an initial learning phase of an ODPF 400 enablesdiscovery of data attributes and/or combinations of data attributes thatwere important predictors of demand. For example, in some embodiments,the relative importance of each of a set of tuples of interest forforecasting demand may be determined by implementing an initial learningphase using input data representative of the tuples of interest andselecting the subset of tuples for which the HTM achieved optimalconvergence.

FIG. 6 illustrates a prior art example 600 of an HTM model result andits associated metrics. The data in example 600 are included forillustration purposes only, and are not representative of embodiments ofthe invention.

As previously described with reference to FIG. 3 , an HTM model can beused as the basis for inference, i.e., to recognize input patterns andthen to make predictions about which other patterns are most likely tofollow the recognized input in a time sequence. In embodiments, an HTMdemand model may be used to receive an input request that includesmultiple types of data, and, in response, generate a separate predictionabout each of the data types at one or more different points of time inthe future. For example, in embodiments, an HTM demand model may receiveinput data representing bookings and user clickstream data, and generatea result that includes separate predictions about the number of bookingsand the number of user clicks from a deal page. In a second example, inresponse to receiving the bookings and clickstream input data, an HTMdemand model result may include daily bookings predictions and monthlyclickstream predictions.

In some embodiments, metrics may be calculated to evaluate the qualityof each of the predictions included in an HTM model result. In someembodiments, calculating metrics representing is implemented by metricsmodule 430. In some embodiments, the metrics associated with aprediction may include an error measurement, representing a comparisonof the prediction with a ground truth value, and/or an anomaly score,representing a comparison between each prediction and its most likelyexpected value.

Referring to prior art example 600, the exemplary model result includestwo predictions based on received input data: the color of an animal andthe categorization of the animal. The exemplary metric is an averageerror for each prediction based on comparing each prediction with itsrespective ground truth value.

FIG. 7 illustrates a prior art example 700 of an HTM model outputdetermination. The data in example 700 are included for illustrationpurposes only, and are not representative of embodiments of theinvention.

In embodiments, an HTM demand model may be used to make simultaneouspredictions of demand at multiple different points of future time. Anexemplary model output that includes these multi-step predictions may bethe predicted number of bookings at one day, one week, and one month inthe future. In some embodiments in which the HTM demand model outputincludes sets of predictions about multiple types of data, each set ofpredictions may be shifted forward in time at different time intervals.In some embodiments, specification of multi-step time intervals forpredictions about at least one type of input data may be included ininput received by ODPF interface 410.

Referring to prior art example 700, the model result at t=0 is generated(see the arrows) by shifting forward predictions made at two previoustime steps. The metrics (average error) for each type of data arecalculated by comparing the shifted predictions to the respective groundtruth value for each type of data (e.g., category=“fish” anddataRow=10).

FIG. 8 shows a schematic block diagram of circuitry 800, some or all ofwhich may be included in, for example, sales pipeline automation system100. As illustrated in FIG. 8 , in accordance with some exampleembodiments, circuitry 800 can include various means, such as processor802, memory 804, communications module 806, and/or input/output module808. As referred to herein, “module” includes hardware, software and/orfirmware configured to perform one or more particular functions. In thisregard, the means of circuitry 800 as described herein may be embodiedas, for example, circuitry, hardware elements (e.g., a suitablyprogrammed processor, combinational logic circuit, and/or the like), acomputer program product comprising computer-readable programinstructions stored on a non-transitory computer-readable medium (e.g.,memory 804) that is executable by a suitably configured processingdevice (e.g., processor 802), or some combination thereof.

Processor 802 may, for example, be embodied as various means includingone or more microprocessors with accompanying digital signalprocessor(s), one or more processor(s) without an accompanying digitalsignal processor, one or more coprocessors, one or more multi-coreprocessors, one or more controllers, processing circuitry, one or morecomputers, various other processing elements including integratedcircuits such as, for example, an ASIC (application specific integratedcircuit) or FPGA (field programmable gate array), or some combinationthereof. Accordingly, although illustrated in FIG. 8 as a singleprocessor, in some embodiments processor 802 comprises a plurality ofprocessors. The plurality of processors may be embodied on a singlecomputing device or may be distributed across a plurality of computingdevices collectively configured to function as circuitry 800. Theplurality of processors may be in operative communication with eachother and may be collectively configured to perform one or morefunctionalities of circuitry 800 as described herein. In an exampleembodiment, processor 802 is configured to execute instructions storedin memory 804 or otherwise accessible to processor 802. Theseinstructions, when executed by processor 802, may cause circuitry 800 toperform one or more of the functionalities of circuitry 800 as describedherein.

Whether configured by hardware, firmware/software methods, or by acombination thereof, processor 802 may comprise an entity capable ofperforming operations according to embodiments of the present inventionwhile configured accordingly. Thus, for example, when processor 802 isembodied as an ASIC, FPGA or the like, processor 802 may comprisespecifically configured hardware for conducting one or more operationsdescribed herein. Alternatively, as another example, when processor 802is embodied as an executor of instructions, such as may be stored inmemory 804, the instructions may specifically configure processor 802 toperform one or more algorithms and operations described herein, such asthose discussed in connection with FIG. 4 .

Memory 804 may comprise, for example, volatile memory, non-volatilememory, or some combination thereof. Although illustrated in FIG. 8 as asingle memory, memory 804 may comprise a plurality of memory components.The plurality of memory components may be embodied on a single computingdevice or distributed across a plurality of computing devices. Invarious embodiments, memory 804 may comprise, for example, a hard disk,random access memory, cache memory, flash memory, a compact disc readonly memory (CD-ROM), digital versatile disc read only memory (DVD-ROM),an optical disc, circuitry configured to store information, or somecombination thereof. Memory 804 may be configured to store information,data (including analytics data), applications, instructions, or the likefor enabling circuitry 800 to carry out various functions in accordancewith example embodiments of the present invention. For example, in atleast some embodiments, memory 804 is configured to buffer input datafor processing by processor 802. Additionally or alternatively, in atleast some embodiments, memory 804 is configured to store programinstructions for execution by processor 802. Memory 804 may storeinformation in the form of static and/or dynamic information. Thisstored information may be stored and/or used by circuitry 800 during thecourse of performing its functionalities.

Communications module 806 may be embodied as any device or meansembodied in circuitry, hardware, a computer program product comprisingcomputer readable program instructions stored on a computer readablemedium (e.g., memory 804) and executed by a processing device (e.g.,processor 802), or a combination thereof that is configured to receiveand/or transmit data from/to another device, such as, for example, asecond circuitry 800 and/or the like. In some embodiments,communications module 806 (like other components discussed herein) canbe at least partially embodied as or otherwise controlled by processor802. In this regard, communications module 806 may be in communicationwith processor 802, such as via a bus. Communications module 806 mayinclude, for example, an antenna, a transmitter, a receiver, atransceiver, network interface card and/or supporting hardware and/orfirmware/software for enabling communications with another computingdevice. Communications module 806 may be configured to receive and/ortransmit any data that may be stored by memory 804 using any protocolthat may be used for communications between computing devices.Communications module 806 may additionally or alternatively be incommunication with the memory 804, input/output module 808 and/or anyother component of circuitry 800, such as via a bus.

Input/output module 808 may be in communication with processor 802 toreceive an indication of a user input and/or to provide an audible,visual, mechanical, or other output to a user. Some example visualoutputs that may be provided to a user by circuitry 800 are discussed inconnection with FIG. 4 . As such, input/output module 808 may includesupport, for example, for a keyboard, a mouse, a joystick, a display, atouch screen display, a microphone, a speaker, a RFID reader, barcodereader, biometric scanner, and/or other input/output mechanisms. Inembodiments wherein circuitry 800 is embodied as a server or database,aspects of input/output module 808 may be reduced as compared toembodiments where circuitry 800 is implemented as an end-user machine orother type of device designed for complex user interactions. In someembodiments (like other components discussed herein), input/outputmodule 808 may even be eliminated from circuitry 800. Alternatively,such as in embodiments wherein circuitry 800 is embodied as a server ordatabase, at least some aspects of input/output module 808 may beembodied on an apparatus used by a user that is in communication withcircuitry 800. Input/output module 808 may be in communication with thememory 804, communications module 806, and/or any other component(s),such as via a bus. Although more than one input/output module and/orother component can be included in circuitry 800, only one is shown inFIG. 8 to avoid overcomplicating the drawing (like the other componentsdiscussed herein).

Online demand prediction module 810 may also or instead be included andconfigured to perform the functionality discussed herein related to theonline demand prediction framework discussed above. In some embodiments,some or all of the functionality of online demand prediction may beperformed by processor 802. In this regard, the example processes andalgorithms discussed herein can be performed by at least one processor802 and/or online demand prediction module 810. For example,non-transitory computer readable media can be configured to storefirmware, one or more application programs, and/or other software, whichinclude instructions and other computer-readable program code portionsthat can be executed to control each processor (e.g., processor 802and/or online demand prediction module 810) of the components of system100 to implement various operations, including the examples shown above.As such, a series of computer-readable program code portions areembodied in one or more computer program products and can be used, witha computing device, server, and/or other programmable apparatus, toproduce machine-implemented processes.

Any such computer program instructions and/or other type of code may beloaded onto a computer, processor or other programmable apparatus'scircuitry to produce a machine, such that the computer, processor otherprogrammable circuitry that execute the code on the machine create themeans for implementing various functions, including those describedherein.

It is also noted that all or some of the information presented by theexample displays discussed herein can be based on data that is received,generated and/or maintained by one or more components of system 100. Insome embodiments, one or more external systems (such as a remote cloudcomputing and/or data storage system) may also be leveraged to provideat least some of the functionality discussed herein.

As described above in this disclosure, aspects of embodiments of thepresent invention may be configured as methods, mobile devices, backendnetwork devices, and the like. Accordingly, embodiments may comprisevarious means including entirely of hardware or any combination ofsoftware and hardware. Furthermore, embodiments may take the form of acomputer program product on at least one non-transitorycomputer-readable storage medium having computer-readable programinstructions (e.g., computer software) embodied in the storage medium.Any suitable computer-readable storage medium may be utilized includingnon-transitory hard disks, CD-ROMs, flash memory, optical storagedevices, or magnetic storage devices.

Embodiments of the present invention have been described above withreference to block diagrams and flowchart illustrations of methods,apparatuses, systems and computer program products. It will beunderstood that each block of the circuit diagrams and process flowdiagrams, and combinations of blocks in the circuit diagrams and processflowcharts, respectively, can be implemented by various means includingcomputer program instructions. These computer program instructions maybe loaded onto a general purpose computer, special purpose computer, orother programmable data processing apparatus, such as processor 802and/or online demand prediction module 810 discussed above withreference to FIG. 8 , to produce a machine, such that the computerprogram product includes the instructions which execute on the computeror other programmable data processing apparatus create a means forimplementing the functions specified in the flowchart block or blocks.

These computer program instructions may also be stored in acomputer-readable storage device (e.g., memory 804) that can direct acomputer or other programmable data processing apparatus to function ina particular manner, such that the instructions stored in thecomputer-readable storage device produce an article of manufactureincluding computer-readable instructions for implementing the functiondiscussed herein. The computer program instructions may also be loadedonto a computer or other programmable data processing apparatus to causea series of operational steps to be performed on the computer or otherprogrammable apparatus to produce a computer-implemented process suchthat the instructions that execute on the computer or other programmableapparatus provide steps for implementing the functions discussed herein.

Accordingly, blocks of the block diagrams and flowchart illustrationssupport combinations of means for performing the specified functions,combinations of steps for performing the specified functions and programinstruction means for performing the specified functions. It will alsobe understood that each block of the circuit diagrams and processflowcharts, and combinations of blocks in the circuit diagrams andprocess flowcharts, can be implemented by special purpose hardware-basedcomputer systems that perform the specified functions or steps, orcombinations of special purpose hardware and computer instructions

Many modifications and other embodiments of the inventions set forthherein will come to mind to one skilled in the art to which theseinventions pertain having the benefit of the teachings presented in theforegoing descriptions and the associated drawings. Therefore, it is tobe understood that the inventions are not to be limited to the specificembodiments disclosed and that modifications and other embodiments areintended to be included within the scope of the appended claims.Although specific terms are employed herein, they are used in a genericand descriptive sense only and not for purposes of limitation.

What is claimed is:
 1. A system, comprising one or more computers andone or more storage devices storing instructions that are operable, whenexecuted by the one or more computers, to cause the one or morecomputers to: retrieve a demand model configured to learn temporalpatterns representing sequences of states of an input data streamrepresenting a time series of demand data associated with offers forgoods, services, or experiences purchased via one or more electronicinstruments; simultaneously generate, using the demand model, aplurality of predictions of future states of the input data stream,wherein each prediction of the plurality of predictions is associatedwith a different unique data type and a particular time step in a futuretime sequence, wherein the demand model comprises a plurality of layersarranged in a hierarchy, wherein each layer in the hierarchy isconfigured based on a respectively distinct sequence of patterns forprocessing at least one or more clickstream data portions of the inputdata stream, and wherein the one or more clickstream data portionsrepresent one or more user interactions with respect to the one or moreelectronic instruments; and adjust a forecasted demand associated withthe goods, services, or experiences based at least on the plurality ofpredictions of the future states of the input data stream.
 2. The systemof claim 1, wherein the one or more storage devices store instructionsthat are operable, when executed by the one or more computers, tofurther cause the one or more computers to: transmit the forecasteddemand to a supply identification module associated with a merchantdatabase.
 3. The system of claim 1, wherein the time series of demanddata is a first time series of demand data, and wherein the one or morestorage devices store instructions that are operable, when executed bythe one or more computers, to further cause the one or more computersto: receive a new input data stream representing second time series ofdemand data configured based on a combination of attributes; andgenerate, using the demand model, a second set of predictions of futurestates of the new input data stream.
 4. The system of claim 1, whereineach layer in the hierarchy comprises an interconnection to a parentlayer in the hierarchy.
 5. The system of claim 4, wherein a bottom layerof the hierarchy receives the input data stream, wherein the bottomlayer generates patterns based on the input data stream, and wherein thepatterns are provided as inputs to the parent layer.
 6. The system ofclaim 1, wherein respective layers of the plurality of layers arrangedin the hierarchy store a respective model of the respectively distinctsequence of temporal patterns.
 7. The system of claim 1, wherein thedemand model is configured to learn the temporal patterns using acortical learning algorithm.
 8. The system of claim 1, wherein thedemand model is configured to modify at least one temporal pattern fromthe temporal patterns.
 9. The system of claim 1, wherein the demandmodel is configured to store at least one new temporal pattern from thetemporal patterns.
 10. The system of claim 1, wherein each prediction ofthe plurality of predictions is associated with an error score.
 11. Thesystem of claim 1, wherein each prediction of the plurality ofpredictions is associated with an anomaly score.
 12. The system of claim1, wherein the one or more storage devices store instructions that areoperable, when executed by the one or more computers, to further causethe one or more computers to: adjust formatting of one or more portionsof the input data stream provided to the plurality of layers of thedemand model based at least on one or more attributes related to thegoods, services, or experiences.
 13. A computer-implemented method,comprising: retrieving a demand model configured to learn temporalpatterns representing sequences of states of an input data streamrepresenting a time series of demand data associated with offers forgoods, services, or experiences purchased via one or more electronicinstruments; simultaneously generating, using the demand model, aplurality of predictions of future states of the input data stream,wherein each prediction of the plurality of predictions is associatedwith a different unique data type and a particular time step in a futuretime sequence, wherein the demand model comprises a plurality of layersarranged in a hierarchy, wherein each layer in the hierarchy isconfigured based on a respectively distinct sequence of patterns forprocessing at least one or more clickstream data portions of the inputdata stream, and wherein the one or more clickstream data portionsrepresent one or more user interactions with respect to the one or moreelectronic instruments; and adjusting a forecasted demand associatedwith the goods, services, or experiences based at least on the pluralityof predictions of the future states of the input data stream.
 14. Thecomputer-implemented method of claim 13, further comprising: collectingthe time series of demand data from a set of data sources comprising aplurality of unique data types.
 15. The computer-implemented method ofclaim 13, wherein the time series of demand data is a first time seriesof demand data, and further comprising: receiving a new input datastream representing second time series of demand data configured basedon a combination of attributes; and generating, using the demand model,a second set of predictions of future states of the new input datastream.
 16. The computer-implemented method of claim 13, furthercomprising: receiving the input data stream via a bottom layer of theplurality of layers arranged in the hierarchy associated with the demandmodel; generating, via the bottom layer, patterns based on the inputdata stream; and providing the patterns as inputs to a parent layer ofthe plurality of layers.
 17. The computer-implemented method of claim13, further comprising: storing a respective model of the respectivelydistinct sequence of temporal patterns.
 18. A computer program product,stored on a non-transitory computer readable medium, comprisinginstructions that when executed by one or more computers cause the oneor more computers to: retrieve a demand model configured to learntemporal patterns representing sequences of states of an input datastream representing a time series of demand data associated with offersfor goods, services, or experiences purchased via one or more electronicinstruments; simultaneously generate, using the demand model, aplurality of predictions of future states of the input data stream,wherein each prediction of the plurality of predictions is associatedwith a different unique data type and a particular time step in a futuretime sequence, wherein the demand model comprises a plurality of layersarranged in a hierarchy, wherein each layer in the hierarchy isconfigured based on a respectively distinct sequence of patterns forprocessing at least one or more clickstream data portions of the inputdata stream, and wherein the one or more clickstream data portionsrepresent one or more user interactions with respect to the one or moreelectronic instruments; and adjust a forecasted demand associated withthe goods, services, or experiences based at least on the plurality ofpredictions of the future states of the input data stream.
 19. Thecomputer program product of claim 18, wherein the instructions, whenexecuted by the one or more computers, further cause the one or morecomputers to: collect the time series of demand data from a set of datasources comprising a plurality of unique data types.
 20. The computerprogram product of claim 18, wherein the instructions, when executed bythe one or more computers, further cause the one or more computers to:receive the input data stream via a bottom layer of the plurality oflayers arranged in the hierarchy associated with the demand model;generate, via the bottom layer, patterns based on the input data stream;and provide the patterns as inputs to a parent layer of the plurality oflayers.
 21. The computer program product of claim 18, wherein theinstructions, when executed by the one or more computers, further causethe one or more computers to: store a respective model of therespectively distinct sequence of temporal patterns.